import Vue from 'vue'
import App from './App.vue'
import History from './components/History.vue'
import Helloworld from './components/HelloWorld.vue'
import Current from './components/Current.vue'
import axios from 'axios'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueRouter from 'vue-router';
import VueWechatTitle from 'vue-wechat-title'

Vue.config.productionTip = false
Vue.prototype.$http = axios
Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.use(VueWechatTitle)


let router = new VueRouter({
  routes: [
      //一个个对象
      { path: '/', component: Current , name: 'current' , meta: {title: '智能灯杆 - 实时数据'}},
      { path: '/history', component: History , name: 'history',meta: {title: '智能灯杆 - 历史数据'}},
      { path: '/helloworld', component: Helloworld , name: 'helloworld',meta: {title: '智能灯杆'}},
  ]
});


new Vue({
  el: '#app',
  render: h => h(App),
  router: router
}).$mount('#app')
